// index.js
import { formatNumber } from '../../utils/util.js'
import request from '../../utils/request'

Page({
  data: {
    paymentLogs: []
  },
  async onLoad(options) {
    const paymentId = options.paymentId
    const data = await request.get(`/mvs/payment/list/detail/${paymentId}`)
    this.setData({
      paymentLogs: data.detailList.map(item => ({
        ...item,
        paymentMoney: formatNumber(item.paymentMoney) + ' 元'
      }))
    })
  }
})
